<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
		<script src="js/mock.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/database.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="css/commodity-details.css" />
	</head>
	<body>
		<div id="banner">
			<div id="idot" class="space-between"></div>
			<div id="back">
				<img src="img/small-back.svg">
			</div>
			<div id="more">
				<img src="img/small-more.svg">
			</div>
			<ul id="banner-box">
				<li></li>
				<li></li>
				<li></li>
			</ul>
		</div>
		<div id="shop-details">
			<div class="shopset">
				<p class="pone">
					全新原装樱花轮胎立马公主电动车电瓶车摩托车真空外胎80-80-11
				</p>
				<img id="share" src="img/share.svg" >
				<p class="ptwo">全压胶 可挂内胆 帽可入领 宽松剪裁 防水透气 018春夏新款 </p>
				<p class="pthree"><span id="pts">￥1599</span><del>￥1699</del></p>
				<p class="space-between four"><span>包邮</span><span>已兑换：568件</span></p>
			</div>
			<div class="explain bo">
				<span class="say">活动</span>
				<span>满减：满1999减49</span>
				<img class="next" src="img/next.svg" >
			</div>
		</div>
		<div id="shop-style">
			<ul id="styleul">
				<li class="explain to">
					<span class="say">规格</span>
					<span>已选 XL 黑色</span>
					<img class="next" src="img/next.svg" >
				</li>
				<li class="explain to">
					<span class="say">商品所在地</span>
					<span>北京市 朝阳区</span>
					<img class="next" src="img/next.svg" >
				</li>
				<li class="zc"><span>√</span>支持7天无理由退货</li>
			</ul>
		</div>
		<div id="comment">
			<div class="comment-head space-between">
				<span>用户评价(14257)</span>
				<div class="head-right">
					<span class="color">98.6%</span>
					<span class="my">满意</span>
					<img src="img/next.svg" >
				</div>
			</div>
			<div class="comment-text">
				<div class="comment-user">
					<img src="img/head-photo.jpg" >
					<span>骑毛驴玩小米</span>
				</div>
				<div class="comment-main">
					<p class="pl">小东西很好，双12买的13号就到了，买的时候没告诉老婆，收到之后立马让它先表演一下，结果老婆高兴坏了，出乎我意料的准许我来撩客服妹子，今天我头发理了，胡子刮了，放在衣柜里10多年的西装皮鞋也穿上了。撒大声地爱上你你家是否擦拭九点半安佛阿森纳从沙佛拿饭马萨村民拉康师傅难受。安次哦啊身份弄死你朵法拉是否能。暗示法浓氨水念佛爱上你佛爱上你发生次那时就放那酸辣粉那算了放哪是否能散发出欧艾斯非农。爱是发了撒封面，dota的傻不傻风暴阿什拉夫那看。</p>
					<span id="all" class="comment-all">全文</span>
				</div>
				<div class="comment-reply">
					<p><span>官方回复：</span>谢陛下赐予沉甸甸的百万亿垓的赞，日后定当勇往直前！PS：唉呀妈呀，累死姐了，要知道作为一个数学从不及格的人，弄明白这个有多难！求表扬O(∩_∩)O~感谢您对小米的支持~</p>
				</div>
			</div>
		</div>
		<div id="shopclk">
			<ul class="space-between">
				<li>商品详情</li>
				<li>参数</li>
			</ul>
		</div>
		<div id="commodity-img">
			<img src="img/conversion-img1.jpg" >
			<img src="img/conversion-img2.jpg" >
		</div>
		<div id="foot" class="flex">
			<ul class="flex footul">
				<li id="love">
					<div class="img">
						<img src="img/love.svg" >
					</div>
					
					<p>喜欢</p>
				</li>
				<span class="bian"></span>
				<li>
					<div class="img">
						<img src="img/shop-shop-cart.svg" >
					</div>
					
					<p>购物车</p>
					<label>2</label>
				</li>
			</ul>
			<button id="buy" type="button">立即购买</button>
		</div>
	</body>
	<script src="js/resultbank.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		function banner() {
			app.mockhot('/shopbanner', function(res) {
				let responseText = JSON.parse(res);
				let box = document.getElementById('banner-box');
				let li = box.getElementsByTagName('li');
				for (let i = 0; i < responseText.src.length; i++) {
					li[i].style.background = 'url(' + responseText.src[i] + ') no-repeat center center';
				}
			})
			app.banner('banner', 3000);
		}
		banner()
		
		function pmore(){
			let all = document.getElementById('all');
			let _p=document.getElementsByClassName('pl')[0];
			let n = 0;
			
			all.addEventListener('touchend',function(){
				if(n==0){
					_p.style.cssText='-webkit-box-orient: inherit;height: auto;';
					n=1;
				}else{
					_p.style.cssText='-webkit-box-orient: vertical;height: 2.222222rem;';
					n=0;
				}	
			})
		}
		pmore()
		
		function love(){
			let loveli=document.getElementById('love');
			let oimg = loveli.getElementsByTagName('img')[0];
			let n = 0;
			
			loveli.addEventListener('touchend',function(){
				if(n==0){
					oimg.src='img/love-red.png';
					oimg.style.width='0.694444rem';
					setTimeout(function(){
						oimg.style.width='0.583333rem';
					},300)
					n=1;
				}else{
					oimg.src='img/love.svg';
					n=0
				}
			})
		}
		love()
	</script>
</html>
